package com.oplus.model;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ui.IEditorInput;

public class oTree implements IAdaptable {
	private Long id;
	private String name;
	private List children = null;
	private oTree parent;
	private String img;
	private IEditorInput editorInput;
	
	public oTree(Long id,String name,String img) {
		this.name = name;
		this.id = id;
		this.img = img;
		children = new ArrayList();
	}
	public void addChild(oTree child) {
		children.add(child);
		child.setParent(this);
	}
	
	public List getChildren() {
		return children;
	}

	public Long getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public oTree getParent() {
		return parent;
	}

	protected void setParent(oTree parent) {
		this.parent = parent;
	}
	
	public Object getAdapter(Class adapter) {
		// TODO Auto-generated method stub
		return null;
	}
	public String getImg() {
		return img;
	}

	public String toString(){
		return name;
	}
	public IEditorInput getEditorInput() {
		return editorInput;
	}
	public void setEditorInput(IEditorInput editorInput) {
		this.editorInput = editorInput;
	}


}
